package by.siarhei.java.tij.reusing.exercises.ex16;

/**
 * @author Siarhei Shchahratsou <s.siarhei@gmail.com>
 * @since 16.03.14
 */
public class Amphibian {
    public void kwak() {
        System.out.println("Amphibian.kwak()");
    }

    public void jump() {
        System.out.println("Amphibian.jump()");
    }

    public static void main(String[] args) {
        Frog frog = new Frog();
        Amphibian a = frog;

        a.kwak();
        a.jump();
    }
}

class Frog extends Amphibian {
    @Override
    public void kwak() {
        System.out.println("Frog.kwak()");
    }

    @Override
    public void jump() {
        System.out.println("Frog.jump()");
    }
}
